OpenImage - JavaScript []


.

OpenImage is a piece of JavaScript code designed to display images in a nice environment whithout having to design one single "container" HTML page for each image.
.


Description

Version: v1.2 of Feb. 10th, 1999


If you have lots of images to present on the Web, an Intranet or an Extranet, and would like to display each nicely, with

  • a nice black background to improve contrast,
  • a slick white margin,
  • a title,
  • and a copyright mention,

there was no choice. You had, for each image, to design and write a HTML "container", thus raising the following issues :

  • as many HTML pages to write as you have images to display
  • clumsy management of how to return to the originating page and link
  • maintenance of pages, especially if you decide to modify background design

All of these have been solved, thanks to "OpenImage.js", a free JavaScript solution offered by Luc PUGEAT and Philippe DEWOST

OpenImage needs just to be installed once (in the - HEAD - section of your page or - better - frameset) and may be then called from any page. Parameters are :

  • name of the image file,
  • new window's name,
  • size (in pixels) of the black area surrounding the picture,
  • new window's title.

The image name must be formatted as follow 'Name.height_width.format'. OpenImage can then :

  • Calculate the size of the new window
  • Open it and set its title as requested
  • Prepare a black background, a white margin, and the area to welcome your image
  • Display your image in that area.

A single click on the ilage will close the window.

Demo : if I want to show a 150 by 360 pixels picture called 'phil70.jpg', I just have to rename it as 'phil70.150_360.jpg'. The reference to get it displayed will just be :

<A HREF="javascript:openImage(self,'phil70','img/phil70.150_360.jpg',30,30,'Resultat du test')">test</A>

Which gives : test

Content

MacOSAAPL ,WindowsMSFT



  • OpenImage is made available as a software archive, containing the script itself, and a Readme file (you are currently reading it).
  • To decompress the archive (in zip format), you need a decompression program [Mac | PC].

 

Usage, copyright, legal stuff


  • OpenImage is released in electronic format only. Author won't send any disk.
  • Distribution permitted as a complete archive only. OpenImage may be included in any CD-ROMs as soon as you have my consent.
    Before any redistribution (online or offline); please make sure that you have the latest version available by comparing the last modified date on the "readme" file and the date on the online file available at http://www.dewost.com/libre/openimage_js_e.html. If needed, download a fresh copy of the archive.
  • OpenImage is 'logoware'.
    OpenImageIf you use it, please put the OpenImage logo anywhere on your web site, and have it link to:
    http://www.dewost.com/libre/openimage_js.html
    An e-mail to the authors will always be welcome...
  • License is valid and free as long as you use the script provided as is, and especially do not modify the comments included within it.
  • The author waves any responsibility and liability for any damages that could occur on your system due to the presence of OpenImage on your hard drive or web site.

 

Installation


Expand the OpenImage archive, open the script and copy it in the <HEAD> section of the HTML page where you'd like to display pictures from. Just use the syntax explained above and you're done.

Hints :

  • When managing a complex site, install OpenImage in the frameset and call it from any page using 'top.openimage(...)'.
  • Do not forget to rename all your images by inserting the 'width_height' information . Mac Tools to perform automatic renaming will be available soon on the site (PC volunteers welcomed)